/**
 * 验证线程的私有属性
 */

#include <iostream>
#include <pthread.h>

void* threadFunc(void* arg) {
    int localVar = 0;
    std::cout << "Thread ID: " << pthread_self() 
              << ", Address of localVar: " << &localVar << std::endl;
    return nullptr;
}

int main() {
    pthread_t t1, t2;
    pthread_create(&t1, nullptr, threadFunc, nullptr);
    pthread_create(&t2, nullptr, threadFunc, nullptr);

    pthread_join(t1, nullptr);
    pthread_join(t2, nullptr);
    return 0;
}
